package com.ita.iosa.servlet;

import java.io.IOException;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.ita.iosa.service.AdminManager;
import com.ita.iosa.service.impl.AdminManagerImpl;

/**
 * Servlet implementation class WhiteServlet
 */
public class WhiteServlet extends HttpServlet {
	private static final long serialVersionUID = 1L;
	private AdminManager adminManager = new AdminManagerImpl();    
    /**
     * @see HttpServlet#HttpServlet()
     */
    public WhiteServlet() {
        super();
        // TODO Auto-generated constructor stub
    }

	/**
	 * @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse response)
	 */
	protected void doGet(HttpServletRequest request, HttpServletResponse response) {
		int mid = Integer.parseInt(request.getParameter("mid"));
		int m = adminManager.whiteMerchant(mid);
		
		try {
			request.getRequestDispatcher("BlackListServlet").forward(request, response);
		} catch (ServletException | IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}

}
